<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Core Plot (iOS): CPTNumericData Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="core-plot-logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Core Plot (iOS)
   
   </div>
   <div id="projectbrief">Cocoa plotting framework for Mac OS X and iOS</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript" src="dynsections.js"></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Animation&#160;&&#160;Constants</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('interface_c_p_t_numeric_data.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">CPTNumericData Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="CPTNumericData" --><!-- doxytag: inherits="NSObject,NSCopying-p-p,NSMutableCopying-p-p,NSCoding-p-p" -->
<p>An annotated <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> type.  
 <a href="interface_c_p_t_numeric_data.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for CPTNumericData:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="interface_c_p_t_numeric_data__inherit__graph.png" border="0" usemap="#_c_p_t_numeric_data_inherit__map" alt="Inheritance graph"/></div>
<map name="_c_p_t_numeric_data_inherit__map" id="_c_p_t_numeric_data_inherit__map">
<area shape="rect" id="node13" href="interface_c_p_t_mutable_numeric_data.html" title="An annotated NSMutableData type." alt="" coords="190,246,372,277"/><area shape="rect" id="node2" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html" title="NSObject" alt="" coords="24,86,104,117"/><area shape="rect" id="node4" href="http://developer.apple.com/iPhone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html" title="\&lt;NSObject&#45;p\&gt;" alt="" coords="5,6,123,37"/><area shape="rect" id="node6" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html" title="\&lt;NSCopying&#45;p\&gt;" alt="" coords="128,86,256,117"/><area shape="rect" id="node8" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSMutableCopying_Protocol/Reference/Reference.html" title="\&lt;NSMutableCopying&#45;p\&gt;" alt="" coords="280,86,460,117"/><area shape="rect" id="node10" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCoding_Protocol/Reference/Reference.html" title="\&lt;NSCoding&#45;p\&gt;" alt="" coords="484,86,605,117"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for CPTNumericData:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="interface_c_p_t_numeric_data__coll__graph.png" border="0" usemap="#_c_p_t_numeric_data_coll__map" alt="Collaboration graph"/></div>
<map name="_c_p_t_numeric_data_coll__map" id="_c_p_t_numeric_data_coll__map">
<area shape="rect" id="node2" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html" title="NSObject" alt="" coords="24,86,104,117"/><area shape="rect" id="node4" href="http://developer.apple.com/iPhone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html" title="\&lt;NSObject&#45;p\&gt;" alt="" coords="5,6,123,37"/><area shape="rect" id="node6" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html" title="\&lt;NSCopying&#45;p\&gt;" alt="" coords="128,86,256,117"/><area shape="rect" id="node8" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSMutableCopying_Protocol/Reference/Reference.html" title="\&lt;NSMutableCopying&#45;p\&gt;" alt="" coords="280,86,460,117"/><area shape="rect" id="node10" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCoding_Protocol/Reference/Reference.html" title="\&lt;NSCoding&#45;p\&gt;" alt="" coords="484,86,605,117"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="class_c_p_t_numeric_data-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Public Class Methods</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Factory Methods</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_numeric_data.html#ab328d59298166bd594c1c194fe2fee4f">numericDataWithData:dataType:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance.  <a href="#ab328d59298166bd594c1c194fe2fee4f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_numeric_data.html#abf3beef67fb393e4d0feba9a5d962f8e">numericDataWithData:dataTypeString:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance.  <a href="#abf3beef67fb393e4d0feba9a5d962f8e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_numeric_data.html#a87c60c52fb300752901d903118c8ea78">numericDataWithArray:dataType:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance.  <a href="#a87c60c52fb300752901d903118c8ea78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_numeric_data.html#aaf45afacfe94d7ba05110105a847673a">numericDataWithArray:dataTypeString:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance.  <a href="#aaf45afacfe94d7ba05110105a847673a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Instance Methods</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Initialization</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a2955411f83bb68caee9bb994153b70a8">initWithData:dataType:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data. This is the designated initializer.  <a href="#a2955411f83bb68caee9bb994153b70a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a4d920fd30a0624cd516d28fccea7c780">initWithData:dataTypeString:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data.  <a href="#a4d920fd30a0624cd516d28fccea7c780"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a05c2356251dcd2afeecac1f28fcf937a">initWithArray:dataType:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data.  <a href="#a05c2356251dcd2afeecac1f28fcf937a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a6bb3143e42aa1722430a723fb81fb38d">initWithArray:dataTypeString:shape:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data.  <a href="#a6bb3143e42aa1722430a723fb81fb38d"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Samples</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#ab44d31b9808042fc62c4bd46ddc488f7">samplePointer:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a pointer to a given sample in the data buffer.  <a href="#ab44d31b9808042fc62c4bd46ddc488f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a12ba5e6606e543c6e213f9570c19deba">sampleValue:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the value of a given sample in the data buffer.  <a href="#a12ba5e6606e543c6e213f9570c19deba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a3e15c0587ce8799610f5be441cb8b9b4">sampleArray</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets an array data samples from the receiver.  <a href="#a3e15c0587ce8799610f5be441cb8b9b4"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Type Conversion</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a3eb25c56b573de7f3b6e90c82c94a15f">dataByConvertingToDataType:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the current numeric data and converts the data to a new data type.  <a href="#a3eb25c56b573de7f3b6e90c82c94a15f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a4eeb1ac8d6a63ad6b14a7ed67ef51a70">dataByConvertingToType:sampleBytes:byteOrder:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the current numeric data and converts the data to a new data type.  <a href="#a4eeb1ac8d6a63ad6b14a7ed67ef51a70"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Data Conversion Utilities</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a363bb66468930747a1960786ee1b9925">convertData:dataType:toData:dataType:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies a data buffer and converts the data to a new data type without changing the byte order.  <a href="#a363bb66468930747a1960786ee1b9925"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_numeric_data.html#a9d9b6aad253261c6d1f81715653a26d3">swapByteOrderForData:sampleSize:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps the byte order for each sample stored in a data buffer.  <a href="#a9d9b6aad253261c6d1f81715653a26d3"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="properties"></a>
Properties</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Data Buffer</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ab6b74dc81c8edade2f2b817decdb79"></a><!-- doxytag: member="CPTNumericData::data" ref="a8ab6b74dc81c8edade2f2b817decdb79" args="" -->
<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#a8ab6b74dc81c8edade2f2b817decdb79">data</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The data buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace066f223a50d1f66d4e6ce58853016f"></a><!-- doxytag: member="CPTNumericData::bytes" ref="ace066f223a50d1f66d4e6ce58853016f" args="" -->
const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#ace066f223a50d1f66d4e6ce58853016f">bytes</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the data buffer’s contents. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93ab918cc9dfcecd51300e442bbbdc21"></a><!-- doxytag: member="CPTNumericData::length" ref="a93ab918cc9dfcecd51300e442bbbdc21" args="" -->
<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#a93ab918cc9dfcecd51300e442bbbdc21">length</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of bytes contained in the data buffer. <br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Data Format</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace5f467dbb883c31e8a27f163cea1f8b"></a><!-- doxytag: member="CPTNumericData::dataType" ref="ace5f467dbb883c31e8a27f163cea1f8b" args="" -->
<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#ace5f467dbb883c31e8a27f163cea1f8b">dataType</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of data stored in the data buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae307c9981911f62b846442e835a06d8a"></a><!-- doxytag: member="CPTNumericData::dataTypeFormat" ref="ae307c9981911f62b846442e835a06d8a" args="" -->
<a class="el" href="_c_p_t_numeric_data_type_8h.html#ab9eb8548b99ca6ad5e1b4646f51f6746">CPTDataTypeFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#ae307c9981911f62b846442e835a06d8a">dataTypeFormat</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The format of the data stored in the data buffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a61fdc670ca0fac32bb107a2a91bef8dc"></a><!-- doxytag: member="CPTNumericData::sampleBytes" ref="a61fdc670ca0fac32bb107a2a91bef8dc" args="" -->
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#a61fdc670ca0fac32bb107a2a91bef8dc">sampleBytes</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of bytes in a single sample of data. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6ab52a1eb94fa433f1523dd01c19bba"></a><!-- doxytag: member="CPTNumericData::byteOrder" ref="aa6ab52a1eb94fa433f1523dd01c19bba" args="" -->
<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/corefoundation/Reference/CFByteOrderUtils/Reference/reference.html">CFByteOrder</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#aa6ab52a1eb94fa433f1523dd01c19bba">byteOrder</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The byte order used to store each sample in the data buffer. <br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Dimensions</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#a229be1e11221032087ca4544b67a869d">shape</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The shape of the data buffer array.  <a href="#a229be1e11221032087ca4544b67a869d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a030eaf27948f5b0367cefc771a28634b"></a><!-- doxytag: member="CPTNumericData::numberOfDimensions" ref="a030eaf27948f5b0367cefc771a28634b" args="" -->
<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#a030eaf27948f5b0367cefc771a28634b">numberOfDimensions</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The number dimensions in the data buffer array. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2d6582c567580a8ca08f41511d07cbb"></a><!-- doxytag: member="CPTNumericData::numberOfSamples" ref="aa2d6582c567580a8ca08f41511d07cbb" args="" -->
<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_numeric_data.html#aa2d6582c567580a8ca08f41511d07cbb">numberOfSamples</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of samples of dataType stored in the data buffer. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An annotated <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> type. </p>
<p><a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> combines a data buffer with information about the data (shape, data type, size, etc.). The data is assumed to be an array of one or more dimensions of a single type of numeric data. Each numeric value in the array, which can be more than one byte in size, is referred to as a "sample". The structure of this object is similar to the NumPy ndarray object.</p>
<p>The supported data types are:</p>
<ul>
<li>1, 2, 4, and 8-byte signed integers</li>
<li>1, 2, 4, and 8-byte unsigned integers</li>
<li><code>float</code> and <code>double</code> floating point numbers</li>
<li><code>float complex</code> and <code>double complex</code> floating point complex numbers</li>
<li><a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSDecimal</a> base-10 numbers</li>
</ul>
<p>All integer and floating point types can be represented using big endian or little endian byte order. Complex and decimal types support only the the host system's native byte order. </p>
</div><hr/><h2>Method Documentation</h2>
<a class="anchor" id="a363bb66468930747a1960786ee1b9925"></a><!-- doxytag: member="CPTNumericData::convertData:dataType:toData:dataType:" ref="a363bb66468930747a1960786ee1b9925" args="(NSData *sourceData,[dataType] CPTNumericDataType *sourceDataType,[toData] NSMutableData *destData,[dataType] CPTNumericDataType *destDataType)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) convertData: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> *)&#160;</td>
          <td class="paramname"><em>sourceData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataType:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a> *)&#160;</td>
          <td class="paramname"><em>sourceDataType</em></td>
        </tr>
        <tr>
          <td class="paramkey">toData:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSMutableData_Class/index.html">NSMutableData</a> *)&#160;</td>
          <td class="paramname"><em>destData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataType:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a> *)&#160;</td>
          <td class="paramname"><em>destDataType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies a data buffer and converts the data to a new data type without changing the byte order. </p>
<p>The data is assumed to be in host byte order and no byte order conversion is performed. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sourceData</td><td>The source data buffer. </td></tr>
    <tr><td class="paramname">sourceDataType</td><td>The data type of the source. </td></tr>
    <tr><td class="paramname">destData</td><td>The destination data buffer. </td></tr>
    <tr><td class="paramname">destDataType</td><td>The new data type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3eb25c56b573de7f3b6e90c82c94a15f"></a><!-- doxytag: member="CPTNumericData::dataByConvertingToDataType:" ref="a3eb25c56b573de7f3b6e90c82c94a15f" args="(CPTNumericDataType newDataType)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *) <a class="el" href="interface_c_p_t_numeric_data.html#a3eb25c56b573de7f3b6e90c82c94a15f">dataByConvertingToDataType:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a>)&#160;</td>
          <td class="paramname"><em>newDataType</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the current numeric data and converts the data to a new data type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newDataType</td><td>The new data type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of the current numeric data converted to the new data type. </dd></dl>

</div>
</div>
<a class="anchor" id="a4eeb1ac8d6a63ad6b14a7ed67ef51a70"></a><!-- doxytag: member="CPTNumericData::dataByConvertingToType:sampleBytes:byteOrder:" ref="a4eeb1ac8d6a63ad6b14a7ed67ef51a70" args="(CPTDataTypeFormat newDataType,[sampleBytes] size_t newSampleBytes,[byteOrder] CFByteOrder newByteOrder)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *) dataByConvertingToType: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#ab9eb8548b99ca6ad5e1b4646f51f6746">CPTDataTypeFormat</a>)&#160;</td>
          <td class="paramname"><em>newDataType</em></td>
        </tr>
        <tr>
          <td class="paramkey">sampleBytes:</td>
          <td></td>
          <td class="paramtype">(size_t)&#160;</td>
          <td class="paramname"><em>newSampleBytes</em></td>
        </tr>
        <tr>
          <td class="paramkey">byteOrder:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/corefoundation/Reference/CFByteOrderUtils/Reference/reference.html">CFByteOrder</a>)&#160;</td>
          <td class="paramname"><em>newByteOrder</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies the current numeric data and converts the data to a new data type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newDataType</td><td>The new data type format. </td></tr>
    <tr><td class="paramname">newSampleBytes</td><td>The number of bytes used to store each sample. </td></tr>
    <tr><td class="paramname">newByteOrder</td><td>The new byte order. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of the current numeric data converted to the new data type. </dd></dl>

</div>
</div>
<a class="anchor" id="a05c2356251dcd2afeecac1f28fcf937a"></a><!-- doxytag: member="CPTNumericData::initWithArray:dataType:shape:" ref="a05c2356251dcd2afeecac1f28fcf937a" args="(NSArray *newData,[dataType] CPTNumericDataType newDataType,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) initWithArray: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataType:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a>)&#160;</td>
          <td class="paramname"><em>newDataType</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data. </p>
<p>Objects in newData should be instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSDecimalNumber_Class/Reference/Reference.html">NSDecimalNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a>, or <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a>. Numbers and strings will be converted to newDataType and stored in the receiver. Any instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> will be treated as "not a number" (NAN) values for floating point types and "0" for integer types. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>An array of numbers. </td></tr>
    <tr><td class="paramname">newDataType</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The initialized <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

</div>
</div>
<a class="anchor" id="a6bb3143e42aa1722430a723fb81fb38d"></a><!-- doxytag: member="CPTNumericData::initWithArray:dataTypeString:shape:" ref="a6bb3143e42aa1722430a723fb81fb38d" args="(NSArray *newData,[dataTypeString] NSString *newDataTypeString,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) initWithArray: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataTypeString:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a> *)&#160;</td>
          <td class="paramname"><em>newDataTypeString</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data. </p>
<p>Objects in newData should be instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSDecimalNumber_Class/Reference/Reference.html">NSDecimalNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a>, or <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a>. Numbers and strings will be converted to newDataTypeString and stored in the receiver. Any instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> will be treated as "not a number" (NAN) values for floating point types and "0" for integer types. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>An array of numbers. </td></tr>
    <tr><td class="paramname">newDataTypeString</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The initialized <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

</div>
</div>
<a class="anchor" id="a2955411f83bb68caee9bb994153b70a8"></a><!-- doxytag: member="CPTNumericData::initWithData:dataType:shape:" ref="a2955411f83bb68caee9bb994153b70a8" args="(NSData *newData,[dataType] CPTNumericDataType newDataType,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) initWithData: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataType:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a>)&#160;</td>
          <td class="paramname"><em>newDataType</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data. This is the designated initializer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>The data buffer. </td></tr>
    <tr><td class="paramname">newDataType</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The initialized <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

<p>Reimplemented in <a class="el" href="interface_c_p_t_mutable_numeric_data.html#af096619a65ba30e18f89d9756bfc13a7">CPTMutableNumericData</a>.</p>

</div>
</div>
<a class="anchor" id="a4d920fd30a0624cd516d28fccea7c780"></a><!-- doxytag: member="CPTNumericData::initWithData:dataTypeString:shape:" ref="a4d920fd30a0624cd516d28fccea7c780" args="(NSData *newData,[dataTypeString] NSString *newDataTypeString,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) initWithData: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataTypeString:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a> *)&#160;</td>
          <td class="paramname"><em>newDataTypeString</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a newly allocated <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> object with the provided data. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>The data buffer. </td></tr>
    <tr><td class="paramname">newDataTypeString</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The initialized <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

</div>
</div>
<a class="anchor" id="a87c60c52fb300752901d903118c8ea78"></a><!-- doxytag: member="CPTNumericData::numericDataWithArray:dataType:shape:" ref="a87c60c52fb300752901d903118c8ea78" args="(NSArray *newData,[dataType] CPTNumericDataType newDataType,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *) numericDataWithArray: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataType:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a>)&#160;</td>
          <td class="paramname"><em>newDataType</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </p>
<p>Objects in newData should be instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSDecimalNumber_Class/Reference/Reference.html">NSDecimalNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a>, or <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a>. Numbers and strings will be converted to newDataType and stored in the receiver. Any instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> will be treated as "not a number" (NAN) values for floating point types and "0" for integer types. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>An array of numbers. </td></tr>
    <tr><td class="paramname">newDataType</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

</div>
</div>
<a class="anchor" id="aaf45afacfe94d7ba05110105a847673a"></a><!-- doxytag: member="CPTNumericData::numericDataWithArray:dataTypeString:shape:" ref="aaf45afacfe94d7ba05110105a847673a" args="(NSArray *newData,[dataTypeString] NSString *newDataTypeString,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *) numericDataWithArray: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataTypeString:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a> *)&#160;</td>
          <td class="paramname"><em>newDataTypeString</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </p>
<p>Objects in newData should be instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSDecimalNumber_Class/Reference/Reference.html">NSDecimalNumber</a>, <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a>, or <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a>. Numbers and strings will be converted to newDataTypeString and stored in the receiver. Any instances of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> will be treated as "not a number" (NAN) values for floating point types and "0" for integer types. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>An array of numbers. </td></tr>
    <tr><td class="paramname">newDataTypeString</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

</div>
</div>
<a class="anchor" id="ab328d59298166bd594c1c194fe2fee4f"></a><!-- doxytag: member="CPTNumericData::numericDataWithData:dataType:shape:" ref="ab328d59298166bd594c1c194fe2fee4f" args="(NSData *newData,[dataType] CPTNumericDataType newDataType,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *) numericDataWithData: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataType:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="_c_p_t_numeric_data_type_8h.html#a0b911106a65975081b0063bf419b294b">CPTNumericDataType</a>)&#160;</td>
          <td class="paramname"><em>newDataType</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>The data buffer. </td></tr>
    <tr><td class="paramname">newDataType</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

<p>Reimplemented in <a class="el" href="interface_c_p_t_mutable_numeric_data.html#a11628187374953b7bb2f0f905ebf28bc">CPTMutableNumericData</a>.</p>

</div>
</div>
<a class="anchor" id="abf3beef67fb393e4d0feba9a5d962f8e"></a><!-- doxytag: member="CPTNumericData::numericDataWithData:dataTypeString:shape:" ref="abf3beef67fb393e4d0feba9a5d962f8e" args="(NSData *newData,[dataTypeString] NSString *newDataTypeString,[shape] NSArray *shapeArray)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *) numericDataWithData: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html">NSData</a> *)&#160;</td>
          <td class="paramname"><em>newData</em></td>
        </tr>
        <tr>
          <td class="paramkey">dataTypeString:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a> *)&#160;</td>
          <td class="paramname"><em>newDataTypeString</em></td>
        </tr>
        <tr>
          <td class="paramkey">shape:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *)&#160;</td>
          <td class="paramname"><em>shapeArray</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newData</td><td>The data buffer. </td></tr>
    <tr><td class="paramname">newDataTypeString</td><td>The type of data stored in the buffer. </td></tr>
    <tr><td class="paramname">shapeArray</td><td>The shape of the data buffer array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_numeric_data.html" title="An annotated NSData type.">CPTNumericData</a> instance. </dd></dl>

<p>Reimplemented in <a class="el" href="interface_c_p_t_mutable_numeric_data.html#a37ac676d6a348f8e7c12b651de1cc009">CPTMutableNumericData</a>.</p>

</div>
</div>
<a class="anchor" id="a3e15c0587ce8799610f5be441cb8b9b4"></a><!-- doxytag: member="CPTNumericData::sampleArray" ref="a3e15c0587ce8799610f5be441cb8b9b4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> *) <a class="el" href="interface_c_p_t_numeric_data.html#a3e15c0587ce8799610f5be441cb8b9b4">sampleArray</a> </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets an array data samples from the receiver. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html">NSArray</a> of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a> objects representing the data from the receiver. </dd></dl>

</div>
</div>
<a class="anchor" id="ab44d31b9808042fc62c4bd46ddc488f7"></a><!-- doxytag: member="CPTNumericData::samplePointer:" ref="ab44d31b9808042fc62c4bd46ddc488f7" args="(NSUInteger sample)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void *) <a class="el" href="interface_c_p_t_numeric_data.html#ab44d31b9808042fc62c4bd46ddc488f7">samplePointer:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td>
          <td class="paramname"><em>sample</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets a pointer to a given sample in the data buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sample</td><td>The index into the sample array. The array is treated as if it only has one dimension. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the sample or <code>NULL</code> if the sample index is out of bounds. </dd></dl>

</div>
</div>
<a class="anchor" id="a12ba5e6606e543c6e213f9570c19deba"></a><!-- doxytag: member="CPTNumericData::sampleValue:" ref="a12ba5e6606e543c6e213f9570c19deba" args="(NSUInteger sample)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a> *) <a class="el" href="interface_c_p_t_numeric_data.html#a12ba5e6606e543c6e213f9570c19deba">sampleValue:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td>
          <td class="paramname"><em>sample</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the value of a given sample in the data buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sample</td><td>The index into the sample array. The array is treated as if it only has one dimension. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The sample value wrapped in an instance of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a> or <code>nil</code> if the sample index is out of bounds.</dd></dl>
<p><a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a> does not support complex numbers. Complex number types will be cast to <code>float</code> or <code>double</code> before being wrapped in an instance of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a>. </p>

</div>
</div>
<a class="anchor" id="a9d9b6aad253261c6d1f81715653a26d3"></a><!-- doxytag: member="CPTNumericData::swapByteOrderForData:sampleSize:" ref="a9d9b6aad253261c6d1f81715653a26d3" args="(NSMutableData *sourceData,[sampleSize] size_t sampleSize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) swapByteOrderForData: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSMutableData_Class/index.html">NSMutableData</a> *)&#160;</td>
          <td class="paramname"><em>sourceData</em></td>
        </tr>
        <tr>
          <td class="paramkey">sampleSize:</td>
          <td></td>
          <td class="paramtype">(size_t)&#160;</td>
          <td class="paramname"><em>sampleSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Swaps the byte order for each sample stored in a data buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sourceData</td><td>The data buffer. </td></tr>
    <tr><td class="paramname">sampleSize</td><td>The number of bytes in each sample stored in sourceData. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Property Documentation</h2>
<a class="anchor" id="a229be1e11221032087ca4544b67a869d"></a><!-- doxytag: member="CPTNumericData::shape" ref="a229be1e11221032087ca4544b67a869d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- CPTNumericData:<code> [read, copy]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The shape of the data buffer array. </p>
<p>The shape describes the dimensions of the sample array stored in the data buffer. Each entry in the shape array represents the size of the corresponding array dimension and should be an unsigned integer encoded in an instance of <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a>. </p>

<p>Reimplemented in <a class="el" href="interface_c_p_t_mutable_numeric_data.html#a0aeeb102b44e2cf316767b4f0a43cb44">CPTMutableNumericData</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>Source/<a class="el" href="_c_p_t_numeric_data_8h_source.html">CPTNumericData.h</a></li>
<li>Source/CPTNumericData.m</li>
</ul>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a>      </li>

    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a></li>
   </ul>
 </div>


</body>
</html>
